org.eclipse.vtp.framework.databases.configurations
Class DatabaseConfiguration

java.lang.Object
  extended by org.eclipse.vtp.framework.databases.configurations.DatabaseConfiguration
All Implemented Interfaces:
IConfiguration, DatabaseConstants
Direct Known Subclasses:
JdbcDatabaseConfiguration, JndiDatabaseConfiguration

public abstract class DatabaseConfiguration
extends java.lang.Object
implements IConfiguration, DatabaseConstants

A configuration for a database connection factory.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.databases.configurations.DatabaseConstants
NAME_COLUMN, NAME_COMPARISON, NAME_CRITERIA, NAME_DATABASE, NAME_DRIVER, NAME_JDBC_DATABASE, NAME_JNDI_DATABASE, NAME_MAPPING, NAME_NAME, NAME_PASSWORD, NAME_QUERY, NAME_RESULT_CARDINALITY, NAME_RESULT_LIMIT, NAME_RESULT_NAME, NAME_RESULT_TYPE, NAME_TABLE, NAME_TIMEOUT, NAME_TYPE, NAME_URI, NAME_URL, NAME_USERNAME, NAME_VALUE, NAMESPACE_URI
 
Constructor Summary
DatabaseConfiguration()
          Creates a new DatabaseConfiguration.
 
Method Summary
 void addTable(DatabaseTableConfiguration table)
          Adds a table to the end of this database.
 java.lang.String getName()
          Returns the name of this configuration.
 java.lang.String getPassword()
          Returns the password to connect with.
 DatabaseTableConfiguration[] getTables()
          Returns the tables defined in the database.
 java.lang.String getUsername()
          Returns the user name to connect with.
 void load(org.w3c.dom.Element configurationElement)
          Loads the configuration information from the specified XML element.
 void removeTable(DatabaseTableConfiguration table)
          Removes a table from this database.
 void save(org.w3c.dom.Element configurationElement)
          Saves the configuration information into the supplied XML element.
 void setName(java.lang.String name)
          Sets the name of this configuration.
 void setPassword(java.lang.String password)
          Sets the password to connect with.
 void setUsername(java.lang.String username)
          Sets the user name to connect with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseConfiguration

public DatabaseConfiguration()
Creates a new DatabaseConfiguration.

Method Detail

getName

public java.lang.String getName()
Returns the name of this configuration.

Returns:
The name of this configuration.

setName

public void setName(java.lang.String name)
Sets the name of this configuration.

Parameters:
name - The name of this configuration.

getUsername

public java.lang.String getUsername()
Returns the user name to connect with.

Returns:
The user name to connect with.

setUsername

public void setUsername(java.lang.String username)
Sets the user name to connect with.

Parameters:
username - The user name to connect with.

getPassword

public java.lang.String getPassword()
Returns the password to connect with.

Returns:
The password to connect with.

setPassword

public void setPassword(java.lang.String password)
Sets the password to connect with.

Parameters:
password - The password to connect with.

getTables

public DatabaseTableConfiguration[] getTables()
Returns the tables defined in the database.

Returns:
The tables defined in the database.

addTable

public void addTable(DatabaseTableConfiguration table)
Adds a table to the end of this database.

Parameters:
table - The table to add.

removeTable

public void removeTable(DatabaseTableConfiguration table)
Removes a table from this database.

Parameters:
table - The table to remove.

load

public void load(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Loads the configuration information from the specified XML element.

Specified by:
load in interface IConfiguration
Parameters:
configurationElement - The element to load the configuration from.

save

public void save(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Saves the configuration information into the supplied XML element.

Specified by:
save in interface IConfiguration
Parameters:
configurationElement - The element to save the configuration to.